# -*- coding:utf-8 -*-
# 1、写一首诗, 放到一个txt文件里面
# 2、删除第二句
with open("./demo.txt", "w", encoding="utf-8") as f:
    f.write("锄禾日当午，\n汗滴禾下土。\n谁知盘中餐，\n粒粒皆辛苦。")

with open("./demo.txt", "r", encoding="utf-8") as f:
    content = f.readlines()
    del content[1]

with open("./demo.txt", "w", encoding="utf-8") as f:
    f.write("".join(content))
